package com.kensure.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import co.kensure.frame.ResultInfo;
import co.kensure.frame.ResultRowInfo;

import com.kensure.shike.weixin.service.WeixinXiaoChengXuService;

/**
 * 微信二维码
 * 
 * @author fankaidi
 *
 */
@Controller
@RequestMapping(value = "qrcode")
public class QRCodeController {
	@Resource
	private WeixinXiaoChengXuService weixinXiaoChengXuService;

	/**
	 * 生成二维码
	 */
	@ResponseBody
	@RequestMapping(value = "wxa/unlimit.do", method = { RequestMethod.POST, RequestMethod.GET }, produces = "application/json;charset=UTF-8")
	public ResultInfo tjtj(HttpServletRequest req, HttpServletResponse rep) {
		String scene = req.getParameter("scene");
		String page = req.getParameter("page");
		String cont = weixinXiaoChengXuService.getUnlimited(scene, page);
		return new ResultRowInfo(cont);
	}

}
